<?php
namespace Project\Model;

use Zend\InputFilter\Factory as InputFactory;     // <-- Add this import
use Zend\InputFilter\InputFilter;                 // <-- Add this import
use Zend\InputFilter\InputFilterAwareInterface;   // <-- Add this import
use Zend\InputFilter\InputFilterInterface;

class Projects //implements InputFilterAwareInterface
{
    public $id;
    public $name;
    public $description;
	public $status;
	public $ownedsecurebleitem_id;
	protected $inputFilter;

    public function exchangeArray($data)
    {
        $this->id     = (isset($data['id'])) ? $data['id'] : null;
        $this->name = (isset($data['name'])) ? $data['name'] : null;
        $this->description  = (isset($data['description'])) ? $data['description'] : null;
		$this->status = (isset($data['status'])) ? $data['status'] : null;
		$this->ownedsecurebleitem_id = (isset($data['ownedsecurebleitem_id'])) ? $data['ownedsecurebleitem_id'] : null;
		
    }
	public function __construct (array $options = null){
	if (is_array($options)) {
	$this->setOptions($options);
	}
	}
   public function setInputFilter(InputFilterInterface $inputFilter)
    {
    	throw new \Exception("Not used");
    }
    
    public function getInputFilter()
    {
    	if (!$this->inputFilter) {
    		$inputFilter = new InputFilter();
    		$factory     = new InputFactory();
    
    		$inputFilter->add($factory->createInput(array(
    				'name'     => 'id',
    				'required' => true,
    				'filters'  => array(
    						array('name' => 'StripTags'),
    						array('name' => 'StringTrim'),
    				),
    				
    		)));
			$inputFilter->add($factory->createInput(array(
    				'name'     => 'name',
    				'required' => true,
    				'filters'  => array(
    						array('name' => 'StripTags'),
    						array('name' => 'StringTrim'),
    				),
    				
    		)));
    
    		$inputFilter->add($factory->createInput(array(
    				'name'     => 'description',
    				'required' => true,
    				'filters'  => array(
    						array('name' => 'StripTags'),
    						array('name' => 'StringTrim'),
    				),
    				
    		)));
    
    		$inputFilter->add($factory->createInput(array(
    				'name'     => 'status',
    				'required' => true,
    				'filters'  => array(
    						array('name' => 'StripTags'),
    						array('name' => 'StringTrim'),
    				),
    				
    		)));
			$inputFilter->add($factory->createInput(array(
    				'name'     => 'ownedsecurebleitem_id',
    				'required' => true,
    				'filters'  => array(
    						array('name' => 'StripTags'),
    						array('name' => 'StringTrim'),
    				),
    				
    		)));
			$this->inputFilter = $inputFilter;
			}
    		
    	return $this->inputFilter;
    }
}
